//
//  NSString+MarsBase64.h
//  WKWebDemo
//
//  Created by yangpenghua on 2018/3/27.
//  Copyright © 2018年 linzi. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSString (MarsBase64)

+ (NSString *)mars_stringWithBase64EncodedString:(NSString *)string;
- (NSString *)mars_base64EncodedStringWithWrapWidth:(NSUInteger)wrapWidth;
//编码
- (NSString *)mars_base64EncodedString;
//解码
- (NSString *)mars_base64DecodedString;
- (NSData *)mars_base64DecodedData;

#pragma - 将saveBase64编码中的"-"，"_"字符串转换成"+"，"/"，字符串长度余4倍的位补"=" 解码
+ (NSData*)mars_safeUrlBase64Decode:(NSString*)safeUrlbase64Str;
#pragma - 因为Base64编码中包含有+,/,=这些不安全的URL字符串，所以要进行换字符  加密
+ (NSString*)mars_safeUrlBase64Encode:(NSData*)data;

@end
